import Validator from '@/utils/Validator';
import request from '@/lib/request';
import * as auth from '@/plugins/utils/auth.js'
import { buildArrayElePrefix, buildArrayEleReplace, doGetRequest, doPostRequest } from '@/utils/lego';
export default function installPlugins(app){
	// 获取基础常量
	app.config.globalProperties.api = 'https://pms.liyanglw.com';
	//app.config.globalProperties.api = 'http://localhost:8080';
	// 工具类
	app.config.globalProperties.isEmpty = Validator.isEmpty
	app.config.globalProperties.isNotEmpty = Validator.isNotEmpty
	app.config.globalProperties.buildArrayElePrefix = buildArrayElePrefix
	app.config.globalProperties.buildArrayEleReplace = buildArrayEleReplace
	// HTTP 工具类
	app.config.globalProperties.get = doGetRequest
	app.config.globalProperties.post = doPostRequest
	app.config.globalProperties.request = request
	// 鉴权工具类
	app.config.globalProperties.doLogin = auth.doLogin
}
